Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: windows adaptor was failing to load #44

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

epmog
Copy link
Contributor

@epmog epmog commented Jun 3, 2024

Resolves #40

What was the problem/requirement? (What/Why)

There were a few problems with using C4D on windows:

  1. The adaptor runtime client was failing to find pywin32 when attempting to connect: ModuleNotFoundError: No module named 'win32file'
  2. There were some misdirection in the stack trace when failing to load pywin32. It would complain with NameError: name 'main' is not defined. Did you mean: 'min'? since we were catching the above error
  3. The adaptor was trying to load the posix interface to communicate

What was the solution? (How)

  1. Documented the requirement to install pywin32 into C4D's python environment.
  2. Removed the try/except around loading the runtime client to make it easier to debug
  3. Swapped HTTPClientInterface to the OS-agnostic ClientInterface to work on both Linux and Windows.
  4. Cut an issue to remove the pywin32 dependency from the openjd adaptor runtime to remove this rough edge. Link: Feature request: remove pywin32 dependency from runtime client OpenJobDescription/openjd-adaptor-runtime-for-python#131

What is the impact of this change?

You can render on Windows!

How was this change tested?

hatch run fmt
hatch build
hatch run lint
hatch run test

The adaptor was also able to successfully render a job

Was this change documented?

Yup!

Is this a breaking change?

Nope!


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link

sonarqubecloud bot commented Jun 3, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@epmog epmog marked this pull request as ready for review June 3, 2024 18:44
@epmog epmog requested a review from a team as a code owner June 3, 2024 18:44
@epmog epmog merged commit f5b1c6d into aws-deadline:mainline Jun 3, 2024
13 checks passed
@epmog epmog deleted the fix_windows_adaptor_loading branch June 3, 2024 18:57
andymanaws pushed a commit to andymanaws/deadline-cloud-for-cinema-4d that referenced this pull request Sep 12, 2024
@karthikbekalp karthikbekalp added the bug Something isn't working label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Adaptor is unable to find win32file
4 participants